function sub(){
    console.log("----表单-----");
    let form =document.getElementById('110')


    let username=document.getElementsByName('username')[0]
    if(username){
            let usernamevalue=username.value
            console.log(usernamevalue);
            if(usernamevalue.length>0){
                    return true
            }
let lbtext=document.getElementById('lbltxt')
console.log(lbtext);
lbtext.innerHTML='用户名没填'
return false
}
return true
}

let p=new Promise(function(resolve,reject){
let isok=true
if(isok){
    resolve()
}else{
    reject()
}
})

p.then(()=>{
console.log('我成功了');
}).catch(()=>{console.log('我失败了');})
